Micron Document
.d8888b. 888 d8b 888b 888 888
d88P Y88b 888 Y8P 8888b 888 888
Y88b. 888 88888b 888 888
"Y888b. .d88b. 88888b. 88888b. 888 .d88b. 888Y88b 888 .d88b. 888888
"Y88b. d88""88b 888 "88b 888 "88b 888 d8P Y8b 888 Y88b888 d8P Y8b 888
"888 888 888 888 888 888 888 888 88888888 888 Y88888 88888888 888
Y88b d88P Y88..88P 888 d88P 888 888 888 Y8b. 888 Y8888 Y8b. Y88b.
"Y8888P" "Y88P" 88888P" 888 888 888 "Y8888 888 Y888 "Y8888 "Y888
888
888
888
[Home] - >[Blog] - [Stories] - [Git] - [Status]

TweeNomad Interactive Fiction Backend

2026-09-13
Tween's .twee files, directly to a playable game in NomadNet
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Over the past day or so I've been working on TweeNomad, a python backend that helps serve Interactive Fiction stories written with Twine (And saved in .twee format) in a NomadNet page. You can look at the code here and visit the live page with a demo here.

Here's a brief explanation of how it works and how it can be used.

First you have to write something. You can either use Twine locally, or the web version avalable in their site ( https://twinery.org/ ). It's rather intuitive to use and there is plenty of documentation on that. Once you are done, you can export it in the .twee format.

Then, on your node, clone the TweeNomad repository, and place the story in the 'stories' folder. When you run the script, it will:

1) Load all files in the folder
2) For each file, create a story ID (A hash of the title) and process the contents
3) Convert each story to a dictionary, where the key is the hash of the passage reference, and the value is the passage body
4) Convert all links to all passages to micron format, taking into account the node address, the story and necessary passage
5) Serve an internal API that takes a request for a certain story and passage and returns the body of text

This script can be daemonized to run in the background.

Then, on the actual NomadNet page:

1) If a story and passage have not been requested, ask the backend for an index of available stories, and generate a list with liks to the first passage of each
2) If a certain passage was requested, query the backend for the body and display it

It's all a bit crude and lacks some functions like save (Though you can just copy the address from your browser and paste it in a text file so you can return to it later), but it should display usable adventures if they are written in micron to begin with (HTML in the stories will be displayed as-is).

Another random cool thing you can now do in NomadNet :)